package com.lineage.server.command.executor;

import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_PacketBoxIcon2;
import com.lineage.server.serverpackets.S_SystemMessage;
import com.lineage.server.serverpackets.ServerBasePacket;
import java.util.StringTokenizer;

public class L1SkillIcon4 implements L1CommandExecutor {
  public static L1CommandExecutor getInstance() {
    return new L1SkillIcon4();
  }
  
  public void execute(L1PcInstance pc, String cmdName, String arg) {
    try {
      int i;
      StringTokenizer st = new StringTokenizer(arg);
      int type = 0;
      if (st.hasMoreTokens())
        type = Integer.parseInt(st.nextToken()); 
      switch (type) {
        case 1:
          i = 0;
          while (i < 1000) {
            pc.sendPackets((ServerBasePacket)new S_PacketBoxIcon2(0 + i, 0, 0, 0));
            i++;
          } 
          break;
        case 2:
          i = 0;
          while (i < 1000) {
            pc.sendPackets((ServerBasePacket)new S_PacketBoxIcon2(0, 0 + i, 0, 0));
            i++;
          } 
          break;
        case 3:
          i = 0;
          while (i < 1000) {
            pc.sendPackets((ServerBasePacket)new S_PacketBoxIcon2(0, 0, 0 + i, 0));
            i++;
          } 
          break;
        case 4:
          i = 0;
          while (i < 1000) {
            pc.sendPackets((ServerBasePacket)new S_PacketBoxIcon2(0, 0, 0, 0 + i));
            i++;
          } 
          break;
      } 
    } catch (Exception e) {
      pc.sendPackets((ServerBasePacket)new S_SystemMessage(String.valueOf(String.valueOf(cmdName)) + " Skillicon 请输入 id 编码。"));
    } 
  }
}
